package com.mycompany.module1;

import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.rsp.http.HttpActivator;
import org.rsp.http.WelcomeFileFilter;
import org.rsp.http.WelcomeFileFilterServlet;


public class Activator extends HttpActivator implements BundleActivator {

	public void start(BundleContext context) throws Exception {

		webXml.addContextParam(HttpActivator.BUNDLE_URI_NAMESPACE, "/module1");
		webXml.addServlet(MyServlet.class).addMapping("/myservlet");
		
		//webXml.addWelcomeFile("/index.jsp");
		
		webXml.addFilter(WelcomeFileFilter.class).addMapping("/")
			.addInitParam(WEBAPP_CONTEXTROOT, "")
			.addInitParam(BUNDLE_URI_NAMESPACE, "/module1")
			.addInitParam(WelcomeFileFilterServlet.WELCOME_FILES, "/module1.jsp");
		
		super.start(context);
	}



}
